#include <bits/stdc++.h>

#define ll long long
#define ull unsigned long long
#define uint unsigned int

#define YES cout << "YES" << '\n'
#define NO cout << "NO" << '\n'
#define endl '\n'
const int INF = 1e9;
const int MOD = 998244353;
using namespace std;

/*思考

*/
void solve() {
    int n;
    cin>>n;
    ull sum=0;
    int cnt=0;
    vector<int> left;
    for(int i=0;i<n;i++){
        int x=0;
        cin>>x;
        sum+=x;
        if(x%2){
            ++cnt;
            left.push_back(x);
        }
    }
    if(left.empty()){
        cout<<0<<endl;
        return;
    }
    sort(left.begin(),left.end());
    for(int i=0;i<cnt/2;++i){
        sum-=left[i];
    }
    cout<<sum<<endl;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 0;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}